const http = uni.$u.http

//登录
export const userLogin = (params = {}, config = {}) => http.post('/login/login', params, config)
export const userRegister = (params = {}, config = {}) => http.post('/login/register', params, config)

//用户列表
export const userList = (params = {}, config = {}) => http.get('/user/user_list', {
	params: params
}, config)

//用户切换
export const userChange = (params = {}, config = {}) => http.post('/user/user_change', params, config)

//更改密码
export const updatePass = (params = {}, config = {}) => http.post('/user/update_password', params, config)

//验证码
export const userSendCode = (params = {}, config = {}) => http.post('/comm/send_code', params, config)
export const userVerifyCode = (params = {}, config = {}) => http.post('/comm/verify_code', params, config)

//个人中心
export const userInfo = (params = {}, config = {}) => http.get('/user/info', {
	params: params
}, config) 
export const indexMenu = (params = {}, config = {}) => http.get('/index/menu', {
	params: params
}, config)
//个人中心-帮助中心 2022-05-27
export const helpCate = (params = {}, config = {}) => http.get('/article/category', {
	params: params
}, config)

//个人中心-帮助中心-文章列表 2022-05-27
export const articleList = (params = {}, config = {}) => http.get('/article/list', {
	params: params
}, config)


//个人中心-帮助中心-文章列表 2022-05-27
export const articleInfo = (params = {}, config = {}) => http.get('/article/info', {
	params: params
}, config)

//结算-提交订单
export const getOrder = (params = {}, config = {}) => http.post('/order/jiesuan', params, config)
//创建订单
export const createOrder = (params = {}, config = {}) => http.post('/order/create', params, config)

//支付
export const pay = (params = {}, config = {}) => http.get('/unionpay_weixin', {
	params: params
}, config)
//获取openid
export const get_openid = (params = {}, config = {}) => http.get('/comm/openid', {
	params: params
}, config)

//订单列表
export const orderList = (params = {}, config = {}) => http.get('/user/order_list', {
	params: params
}, config)


export const orderTongji = (params = {}, config = {}) => http.get('/order/tongji', {
	params: params
}, config)

//订单列表：再次购买
export const orderBuy = (params = {}, config = {}) => http.post('/user/order_buy', params, config)
//订单列表：返利
export const orderRebate = (params = {}, config = {}) => http.post('/user/rebate', params, config)

//订单详情
export const orderDetail = (params = {}, config = {}) => http.get('/user/order_show', {
	params: params
}, config)
//取消订单
export const cancelOrder = (params = {}, config = {}) => http.post('/user/order_cancel', params, config)


//模糊搜索
export const searchKey = (params = {}, config = {}) => http.get('/goods/collect_search_keyword', {
	params: params
}, config)

//热门关键词
export const hotKey = (params = {}, config = {}) => http.get('/goods/history_keyword', {
	params: params
}, config)

//搜索列表
export const searchList = (params = {}, config = {}) => http.get('/goods/list', {
	params: params
}, config)

//搜索测试列表
export const GoodsSearchList = (params = {}, config = {}) => http.get('/goods/list', {
	params: params
}, config)

//搜索记录清除
export const delSearchRec = (params = {}, config = {}) => http.post('/goods/delete_keyword', params, config)

//筛选条件
export const goodsFilter = (params = {}, config = {}) => http.get('/goods/filters', {
	params: params
}, config)

//商品详情页
export const goods_detail = (goods_id, params = {}, config = {}) => http.get('/goods/detail/' + goods_id, {
	params: params
}, config)

//购物车
export const cartList = (params = {}, config = {}) => http.get('/cart/list', {
	params: params
}, config)


//加入购物车
export const addCart = (params = {}, config = {}) => http.post('/cart/add', params, config)

//选择或取消商品
export const cartChecked = (params = {}, config = {}) => http.post('/cart/checked', params, config)

//添加购物车数量
export const cartNum = (params = {}, config = {}) => http.post('/cart/addmun', params, config)

//删除购物车商品/cart/cart_num
export const cartDel = (params = {}, config = {}) => http.post('/cart/delete', params, config)

//获取购物车商品个数
export const getCartNum = (params = {}, config = {}) => http.get('/cart/cart_num', {
	params: params
}, config)

//修改购物车商品价格
export const update_price = (params = {}, config = {}) => http.post('/cart/auto_price', params, config)

//商品分类测试
export const CateList = (params = {}, config = {}) => http.get('/user/user_group', {
	params: params
}, config)
//订单支付状态
export const orderStatus = (params = {}, config = {}) => http.get('/user/order_status', {
	params: params
}, config)

//订单审核
export const orderCheck = (params = {}, config = {}) => http.post('/user/order_check', params, config)


//版本检测
export const versionCheck = (params = {}, config = {}) => http.get('/comm/version', {
	params: params
}, config)

//多会员绑定手机号
export const bindTel = (params = {}, config = {}) => http.post('/user/user_phone', params, config)

//登录
export const login = (params = {}, config = {}) => http.post('/user/login', params, config)

	
export const scanCode = (params = {}, config = {}) => http.post('/wms_code/code_add', params, config)

export const getCode = (params = {}, config = {}) =>http.get('/wms_code/code_list', {
	params:params
}, config)


// 报损单列表
export const getDuryList = (params = {}, config = {}) =>http.get('/cqjy/durg/ls_list', {
	params:params
}, config)


// 报损细单列表
export const getDuryDtlList = (params = {}, config = {}) =>http.get('/cqjy/durg/durg_list', {
	params:params
}, config)


// 扫码添加
export const scanDury = (params = {}, config = {}) =>http.post('/cqjy/durg/code_add', params, config)

// 扫码编辑
export const editDury = (params = {}, config = {}) =>http.post('/cqjy/durg/code_set_qty', params, config)


// 删除扫码
export const deleteDury = (params = {}, config = {}) =>http.post('/cqjy/durg/code_del', params, config)


// 提交扫码
export const endDury = (params = {}, config = {}) =>http.post('/cqjy/durg/code_end', params, config)
